'''
find()、findAll()
'''
from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen("https://www.douban.com/gallery/")
bsObj = BeautifulSoup(html, 'html.parser')

# nameList = bsObj.findAll(text = "电影")
# print(len(nameList))

# nameList = bsObj.findAll(id = "icp")
# print(nameList.get_text())

nameList = bsObj.findAll("", {'id': 'icp'})
for x in nameList:
    print(x.get_text())
